<extend name="Base/common"/>
<!--<script type="text/javascript" src="/SG_Shopwechat/Public/Home/js/iscroll.js"></script>-->
<block name="TITLE"><title>采购列表</title></block>

<block name="body" >
    <div ng-controller="CaigouCtrl" ng-cloak class="ng-cloak" ng-init="indexinit('{$batch}')" >

    <body style="font-size: 15px;background: #efefef;" >
        <table  class="am-table am-margin-bottom-0" style="width:100%;background: white;">
            <thead style="" ng-show="product.length>0">
                <tr>
                    <th ng-show="editmodel"><input type="checkbox" id="checkall" ng-click="checkchange()" /></th>
                    <th>商品名<i class="am-icon am-icon-question-circle" style="color:#555;" data-am-popover="{content: '点击查看商品详情', trigger: 'hover focus'}"></i></th>
                    <th>规格</th>
                    <th>总件数</th>
                    <th>总重</th>
                </tr>
            </thead>
            <tr ng-repeat="p in product" ng-show="!p.del">
                <td ng-show="editmodel">
                    <input type="checkbox" ng-click="productcheck($index)" ng-checked="p.check" >
                </td>
                <td>
                    <a href="{:U('detail')}&id={{p.id}}">{{p.pname}}</a>
                    <i class="am-icon-edit" ng-if="p.status<3"></i>
                </td>
                <td>{{p.spec}}</td>
                <td>{{p.total_num}}</td>
                <td>{{p.total_weight}}</td>
            </tr>
        </table>
        <div class="am-padding-0 am-text-center" style="width: 100%;"><a href="{:U('Index/newproduct')}"><i class="am-margin-right am-text-primary am-icon am-icon-plus-circle" style="font-size: 80px;"></i></a></div>
        <!--<div class="am-margin-0">-->
            <!--<a href="{:U('newproduct')}&batch={$list['batch']}" class="am-btn am-radius am-btn-sm am-btn-warning">添加商品</a>-->
        <!--</div>-->
        <!--<div class="form-control">-->
            <!--<input type="hidden" name="batch" value="{$list.batch}">-->
            <!--<label for="arriveTime">预计到货时间：</label>-->
            <!--<input class="am-form-field" name="arriveTime" id="arriveTime" type="text" placeholder="输入预计到货时间" data-am-datepicker  readonly required/>-->
        <!--</div>-->

        <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1">
            <div class="am-modal-dialog">
                <div class="am-modal-hd">Modal 标题
                    <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                </div>
                <div class="am-modal-bd">
                </div>
            </div>
        </div>
    </body>
    </div>
</block>
<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <script type="text/javascript">
        $('.confirm').click(function(){
            if(confirm("请确认操作")){
            }else{
                return false;
            }
        })
        $('#submit').click(function(){
            if($('#arriveTime').val() == undefined||$('#arriveTime').val()==""){
                alert("请选择到货时间");
                return false;
            }
            if(confirm('确认提交采购单，确认操作后不可撤销')){
            }else{
                return false;
            }
        })
    </script>

</block>
